import request from '@/utils/request'

export function Post(data) {
  return request({
    url: '/cms/api/openai/',
    headers: { 'content-type': 'application/json' },
    method: 'post',
    timeout: 300000,
    data: data
  })
}
export function WritePost(data) {
  return request({
    url: '/cms/api/openai_write_post/',
    headers: { 'content-type': 'application/json' },
    method: 'post',
    timeout: 10000,
    data: data
  })
}

export function WriteHtmlPiece(data) {
  return request({
    url: '/cms/api/openai_write_html_piece/',
    headers: { 'content-type': 'application/json' },
    method: 'post',
    timeout: 10000,
    data: data
  })
}

export function MakeRandomArticle(data) {
  return request({
    url: '/cms/api/make_random_article/',
    headers: { 'content-type': 'application/json' },
    method: 'post',
    timeout: 300000,
    data: data
  })
}

export function GenerateImage(data) {
  return request({
    url: '/cms/api/openai_generate_image/',
    headers: { 'content-type': 'application/json' },
    method: 'post',
    timeout: 300000,
    data: data
  })
}
